package com.yong.sbd.biz.file.service;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件 业务
 *
 * @author Kang Yong
 * @date 2025/10/24
 * @since 1.0.0
 */
public interface FileService {

    /**
     * 文件上传
     *
     * @param file {@link MultipartFile}
     * @return {@link String} 文件名
     * @author KangYong
     * @date 2025/10/24
     */
    String upload(MultipartFile file);

    /**
     * 文件下载
     *
     * @param filePath   {@link String} 文件路径
     * @param dataFolder
     * @param request    {@link HttpServletRequest}
     * @param response   {@link HttpServletResponse}
     * @author KangYong
     * @date 2025/10/24
     */
    void download(String filePath, String dataFolder, HttpServletRequest request, HttpServletResponse response);
}
